The present invention relates to the process of allocating memory in a computer system.
One of the major problems with some programming languages arises from the process of allocating and de-allocating memory. Having the programmer allocate and de-allocate memory provides many advantages when done correctly. However, programmers routinely fail to de-allocate memory when it is no longer needed, and programmers commonly re-use memory that has been de-allocated. Both of these actions can cause a program to behave incorrectly, and can lead to erroneous results or to a “crash” of the computer system.
In order to obviate these problems, designers have created so-called “safe” languages, such as the JAVA™ programming language, Lisp, Modula-3, Perl, Smalltalk, ML, BASIC, C#, and the SafeC programming language. Safe programming languages typically do not trust programmers to recycle storage, because allocation errors can break the language abstraction. Instead, they either make use of a garbage collection mechanism, or use restrictive type systems to ensure that memory is recycled properly. Garbage collection generally runs quickly enough, but often has a substantial storage overhead, which can reduce the amount of storage that is available to do useful computing.